home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power Programmierung
/
Power-Programmierung (Tewi)(1994).iso
/
magazine
/
nvdc87
/
curvef
/
cfit2.eka
< prev
next >
Wrap
Text File
|
1987-09-02
|
1KB
|
56 lines
; CFIT2.EKA
;
; version 1.0
; August 10, 1987
; Copyright (c) 1987 Namir Clement Shammas
;
; Least-square fitting between three or more variables
;
; general model is:
;
; f(x1,...,xn) = a0 + a1 f1(x1,...,xn) + a2 + f2(x1,...,xn) +
; an fn(x1,...,xn)
;
; examples:
;
; Simple models: no cross-product terms
; -------------------------------------
;
; f(x1,x2) = a0 + a1 * x1 + a2 * x2
; f(x1,x2,x3) = a0 + a1 * x1 + a2 * x2 + a3 * x3
; f(x1,x2) = a0 + a1 * Ln(x1) + a2 * sqrt(x2)
; f(x1,x2,x3) = a0 + a1 * x1^2 + a2 * x2 + a3 * Ln(x3)
;
; Advanced models: with cross-product terms
; -----------------------------------------
;
; 3-D surface
; f(x1,x2) = a0 + a1 * x1 + a2 + x1^2 + b1 * x2 + b2 * x2^2 + c1
;
; f(x1,x2,x3) = a0 + a1 * x1 * sqrt(x2) + a2 * Ln(x2) * x3^2
$ substlevel = 0
; state selected model here
f(x1,x2) = a0 + a1 * x1 + a2 * x1^2 + b1 * x2 + b2 * x2^2
f(1,1) = 11
f(1,2) = 17
f(1,3) = 27
f(1,4) = 41
f(2,1) = 7
f(2,2) = 14
f(2,3) = 25
f(2,4) = 40
f(3,1) = -1
f(3,2) = 7
f(3,3) = 19
f(3,4) = 35
f(4,1) = -13
f(4,2) = -4
f(4,3) = 9
f(4,4) = 26